package com.neusoft.resturant.common.exception;

import lombok.Data;

/**
 * @program: resturant
 * @description:
 * @author: lydms
 * @create: 2023-11-29 13:32
 **/


public class BizException extends RuntimeException{

    private int code = 500;

    private String msg;


    public BizException() {
    }

    public BizException(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    /**
     * 获取
     * @return code
     */
    public int getCode() {
        return code;
    }

    /**
     * 设置
     * @param code
     */
    public void setCode(int code) {
        this.code = code;
    }

    /**
     * 获取
     * @return msg
     */
    public String getMsg() {
        return msg;
    }

    /**
     * 设置
     * @param msg
     */
    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String toString() {
        return "BizException{code = " + code + ", msg = " + msg + "}";
    }
}
